<!--页面入口文件-->
<template>
  <div id="app">
    <app-header v-if="header_show"></app-header>
    <!--<p>-->
    <!--<router-link to="/HelloWorld">HelloWorld</router-link>-->
    <!--<router-link to="/PageOne">PageOne</router-link>-->
    <!--</p>-->

    <ul>
      <li v-for="item in links">
        <a @click="$goRoute(item.route)">{{item.text}}</a>
      </li>
    </ul>
    <router-view></router-view>
    <!--<app-footer v-if="footer_show"></app-footer>-->
  </div>
</template>

<script>
  import AppHeader from "./components/common/header";
  import AppFooter from "./components/common/footer";


  export default {
    name: 'App',
    data() {
      return {
        header_show: true,
        footer_show: true,
        links: [


          // {
          //   text: '差评',
          //   route: '/Page01'
          // },
          {
            text: 'HelloWorld',
            route: '/HelloWorld'
          },
          {
            text: 'PageOne',
            route: '/PageOne'
          }]
      }
    },
    components: {
      AppFooter,
      AppHeader
    },

    methods: {

      header: function (bool) {
        this.header_show = bool;
      },
      footer: function (bool) {
        this.footer_show = bool
      }
    }

  }
</script>

<style>
  #app {
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    margin-top: 60px;
  }
</style>
